#include <stdio.h>
#include <ctype.h>
int fwlen(char *string);

int main(void)
{
/**
	char ch;

	while ((ch = getchar()) != 'q')
	{
		if (ch != '\n')
			while (getchar() != '\n')
				continue;
		printf("%c ", ch);
	}
**/
	char str [] = "hello world";
	printf("%d ", fwlen(str));
	return 0;
}

int fwlen(char *string)
{
    int length = 0;

    while (isspace(*string))
        string++;

    while(!isspace(*string))
    {
        length++;
        string++;
    }

    return length;
}
